﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import flash.utils.*;

    public class SFightRole extends IMessageBase
    {
        public var entityId:SEntityId;
        public var ownerEntityId:SEntityId;
        public var groupId:SEntityId;
        public var guildId:SEntityId;
        public var gateChannelId:int;
        public var serverId:int;
        public var cellId:int;
        public var spaceId:int;
        public var point:SPoint;
        public var playerId:int;
        public var username:String;
        public var name:String;
        public var titleId:int;
        public var type:int;
        public var roleId:int;
        public var sex:int;
        public var career:int;
        public var level:int;
        public var VIP:int;
        public var camp:int;
        public var force:int;
        public var fightMode:int;
        public var combat:int;
        public var life:int;
        public var mana:int;
        public var stamina:int;
        public var anger:int;
        public var globalCooldown:int;
        public var avatar:int;
        public var model:int;
        public var talent:int;
        public var growthMax:int;
        public var code:int;
        public var petNumber:int;
        public var mountCode:int;
        public var guildName:String;
        public var guildPosition:int;
        public var guildLevel:int;
        public var openDays:int;
        public var spriteCode:int;
        public var killNum:int;
        public var baseFight:SFightAttribute;
        public var extraFight:SFightAttribute;
        public var addPercent:SFightAttributeAddPercent;
        public var skills:Array;
        public var buffs:Array;
        public var runes:Dictionary;
        public var titles:Array;
        public var entityShows:Dictionary;
        public var proxyLv:int;
        public var proxyEx:int;
        public var proxyEx2:int;
        public var txVip:String;
        public const _type:int = 3026;
        public static var _regist:SFightRole = new SFightRole(true);

        public function SFightRole(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SFightRole();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            this.entityId.__write(param1);
            this.ownerEntityId.__write(param1);
            this.groupId.__write(param1);
            this.guildId.__write(param1);
            param1.writeInt(this.gateChannelId);
            param1.writeInt(this.serverId);
            param1.writeInt(this.cellId);
            param1.writeInt(this.spaceId);
            this.point.__write(param1);
            param1.writeInt(this.playerId);
            param1.writeString(this.username);
            param1.writeString(this.name);
            param1.writeInt(this.titleId);
            param1.writeByte(this.type);
            param1.writeInt(this.roleId);
            param1.writeByte(this.sex);
            param1.writeShort(this.career);
            param1.writeByte(this.level);
            param1.writeShort(this.VIP);
            param1.writeByte(this.camp);
            param1.writeByte(this.force);
            param1.writeByte(this.fightMode);
            param1.writeInt(this.combat);
            param1.writeInt(this.life);
            param1.writeInt(this.mana);
            param1.writeInt(this.stamina);
            param1.writeInt(this.anger);
            param1.writeInt(this.globalCooldown);
            param1.writeInt(this.avatar);
            param1.writeInt(this.model);
            param1.writeShort(this.talent);
            param1.writeByte(this.growthMax);
            param1.writeInt(this.code);
            param1.writeInt(this.petNumber);
            param1.writeInt(this.mountCode);
            param1.writeString(this.guildName);
            param1.writeByte(this.guildPosition);
            param1.writeInt(this.guildLevel);
            param1.writeInt(this.openDays);
            param1.writeInt(this.spriteCode);
            param1.writeInt(this.killNum);
            this.baseFight.__write(param1);
            this.extraFight.__write(param1);
            this.addPercent.__write(param1);
            SeqSkillHelper.write(param1, this.skills);
            SeqBuffHelper.write(param1, this.buffs);
            DictIntStrHelper.write(param1, this.runes);
            SeqTitleHelper.write(param1, this.titles);
            DictIntIntHelper.write(param1, this.entityShows);
            param1.writeInt(this.proxyLv);
            param1.writeInt(this.proxyEx);
            param1.writeInt(this.proxyEx2);
            param1.writeString(this.txVip);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.entityId = new SEntityId();
            this.entityId.__read(param1);
            this.ownerEntityId = new SEntityId();
            this.ownerEntityId.__read(param1);
            this.groupId = new SEntityId();
            this.groupId.__read(param1);
            this.guildId = new SEntityId();
            this.guildId.__read(param1);
            this.gateChannelId = param1.readInt();
            this.serverId = param1.readInt();
            this.cellId = param1.readInt();
            this.spaceId = param1.readInt();
            this.point = new SPoint();
            this.point.__read(param1);
            this.playerId = param1.readInt();
            this.username = param1.readString();
            this.name = param1.readString();
            this.titleId = param1.readInt();
            this.type = param1.readByte();
            this.roleId = param1.readInt();
            this.sex = param1.readByte();
            this.career = param1.readShort();
            this.level = param1.readByte();
            this.VIP = param1.readShort();
            this.camp = param1.readByte();
            this.force = param1.readByte();
            this.fightMode = param1.readByte();
            this.combat = param1.readInt();
            this.life = param1.readInt();
            this.mana = param1.readInt();
            this.stamina = param1.readInt();
            this.anger = param1.readInt();
            this.globalCooldown = param1.readInt();
            this.avatar = param1.readInt();
            this.model = param1.readInt();
            this.talent = param1.readShort();
            this.growthMax = param1.readByte();
            this.code = param1.readInt();
            this.petNumber = param1.readInt();
            this.mountCode = param1.readInt();
            this.guildName = param1.readString();
            this.guildPosition = param1.readByte();
            this.guildLevel = param1.readInt();
            this.openDays = param1.readInt();
            this.spriteCode = param1.readInt();
            this.killNum = param1.readInt();
            this.baseFight = new SFightAttribute();
            this.baseFight.__read(param1);
            this.extraFight = new SFightAttribute();
            this.extraFight.__read(param1);
            this.addPercent = new SFightAttributeAddPercent();
            this.addPercent.__read(param1);
            this.skills = SeqSkillHelper.read(param1);
            this.buffs = SeqBuffHelper.read(param1);
            this.runes = DictIntStrHelper.read(param1);
            this.titles = SeqTitleHelper.read(param1);
            this.entityShows = DictIntIntHelper.read(param1);
            this.proxyLv = param1.readInt();
            this.proxyEx = param1.readInt();
            this.proxyEx2 = param1.readInt();
            this.txVip = param1.readString();
            return;
        }// end function

    }
}
